<template>
	<view class="loaderMask" v-show="params.loadControl" @click.stop="" @touchmove.stop="">
		<view class="loader">
			<div class="circleBox"></div>
			<img class="boxCircleImg" src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/new-fire-iot/logo.png" />
			<view class="ff-color-fff ff-font-14 loadingTxt ff-text-center">{{ params.loadingTxt }}</view>
		</view>
	</view>
</template>

<script setup>
import { reactive } from 'vue';
let params = reactive({
	loadControl: false, // 加载动画显示隐藏
	loadingTxt: '' // 动画的文字提示
});
// 打开动画
let openLoading = e => {
	params.loadControl = true;
	params.loadingTxt = e;
};
// 动画隐藏
let closeLoading = () => {
	params.loadControl = false;
};
defineExpose({
	openLoading,
	closeLoading
});
</script>
